﻿using System;

namespace DDDSample.Domain.Model
{
	/// <summary>
	/// An entity, as explained in the DDD book.
	/// </summary>
	/// <typeparam name="T"></typeparam>
	public abstract class Entity<T>
	{
		/// <summary>
		/// Entities compare by identity, not by attributes.
		/// </summary>
		/// <param name="other">The other entity.</param>
		/// <returns>true if the identities are the same, regardless of other attributes.</returns>
		public abstract bool SameIdentityAs(T other);
	}
}
